[refactor] #117 scrap -> bookmark 리네이밍#119
Conversation
기획 용어 변경에 따라 '스크랩'을 '북마크'로 일괄 변경했습니다. - **변수 및 함수명 변경**: `isScrapped`, `onClickScrap`, `updateScrap` 등을 `isBookmarked`, `onClickBookmark`, `updateBookmark` 등으로 변경했습니다. - **클래스 및 파일명 변경**: `ScrapPosePagingSource` -> `BookmarkPosePagingSource` 등으로 변경했습니다. - **API 엔드포인트 및 DTO 변경**: `/api/poses/scrap` -> `/api/poses/bookmark`로 수정하고 관련 DTO(`UpdateScrapRequest` -> `UpdateBookmarkRequest`)를 변경했습니다. - **UI 텍스트 및 아이콘 변경**: '스크랩'으로 표시되던 텍스트를 '북마크'로 변경하고, 관련 아이콘(`icon_scrap_*` -> `icon_bookmark_*`)도 교체했습니다.
|
Caution Review failedThe pull request is closed. Walkthrough포즈 기능 전반에서 스크랩(scrap) 관련 API, 메서드, 클래스, 프로퍼티명을 북마크(bookmark)로 일관되게 변경하는 리팩토링입니다. 내부 로직이나 제어 흐름은 변경되지 않으며 명칭 및 UI 텍스트만 업데이트됩니다. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 3❌ Failed checks (3 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Tip Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Fix all issues with AI agents
In
`@core/data/src/main/java/com/neki/android/core/data/paging/ScrapPosePagingSource.kt`:
- Around line 9-12: The Kotlin source file name does not match the declared
class: the class is BookmarkPosePagingSource but the file is still named
ScrapPosePagingSource.kt; rename the file to BookmarkPosePagingSource.kt to
follow Kotlin conventions and ensure any references/imports or build scripts
that reference ScrapPosePagingSource.kt are updated accordingly so the class
BookmarkPosePagingSource is defined in a matching file name.
In
`@core/data/src/main/java/com/neki/android/core/data/remote/api/PoseService.kt`:
- Around line 47-65: getBookmarkedPoses uses GET /api/poses/bookmark but
updateBookmark still calls PATCH /api/poses/$poseId/scrap and the DTO
file/class/annotation are inconsistent (UpdateScrapRequest.kt vs
UpdateBookmarkRequest and `@SerialName`("scrap")); confirm the backend contract
and make them consistent: if backend uses "bookmark" update updateBookmark to
PATCH /api/poses/{poseId}/bookmark and rename the DTO file to
UpdateBookmarkRequest.kt, the class to UpdateBookmarkRequest and change
`@SerialName`("scrap") to `@SerialName`("bookmark"); otherwise revert
getBookmarkedPoses to use /api/poses/bookmark or /api/poses/scrap to match the
PATCH, and align DTO filename/class/@SerialName accordingly (ensure references
in PoseService and any serializers are updated).
🧹 Nitpick comments (2)
core/data/src/main/java/com/neki/android/core/data/remote/model/request/UpdateScrapRequest.kt (1)
7-8: 파일명을 클래스명과 일치시키세요.파일
UpdateScrapRequest.kt가UpdateBookmarkRequest클래스를 포함하고 있습니다. Kotlin 관례에 따라 파일명을UpdateBookmarkRequest.kt로 변경하는 것이 좋습니다.feature/pose/impl/src/main/java/com/neki/android/feature/pose/impl/detail/PoseDetailViewModel.kt (1)
102-113:onCleared에서updateBookmark실패 시 처리가 없습니다.이번 PR에서 도입된 이슈는 아니지만,
applicationScope.launch로 실행되는updateBookmark호출의 결과(Result)가 무시되고 있어 실패 시 사용자에게 피드백이 없습니다. 후속 개선으로 로깅이나 재시도 로직 추가를 고려해 보시기 바랍니다.♻️ 실패 처리 추가 제안
if (currentBookmark != committedBookmark) { applicationScope.launch { poseRepository.updateBookmark(id, currentBookmark) + .onFailure { error -> + Timber.e(error, "updateBookmark on onCleared failed") + } } }
Ojongseok
left a comment
There was a problem hiding this comment.
확인했습니다-! 더이상 scrap(스크랩)을 찾아볼 수 없네요. 👍
`ScrapPosePagingSource.kt` 파일의 이름을 `BookmarkPosePagingSource.kt`로 변경하여 용어를 통일했습니다.
`/api/poses/bookmark`를 `/api/poses/scrap`으로 변경했습니다.
🔗 관련 이슈
📙 작업 설명
Summary by CodeRabbit
릴리스 노트
리팩터
스타일